home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-11 | 8.5 KB | 322 lines | [TEXT/MPS ] |
- ;
- ; File: CMApplication.a
- ;
- ; Contains: Header for Color Matching aware applications
- ;
- ; Copyright: © 1992-94 by Apple Computer, Inc., all rights reserved.
- ;
- ;___________________________________________________________________________
- IF &TYPE('__IncludingCMApplication__') = 'UNDEFINED' THEN
- __IncludingCMApplication__ SET 1
-
- IF &TYPE('__IncludingQuickEqu__') = 'UNDEFINED' THEN
- INCLUDE 'QuickEqu.a'
- ENDIF
-
- gestaltColorMatchingVersion EQU 'cmtc'
-
- CMTrap EQU $ABEE
-
- ; PicComments
- CMBeginProfile EQU 220
- CMEndProfile EQU 221
- CMEnableMatching EQU 222
- CMDisableMatching EQU 223
-
- ; Defines for fieldMask in profile search record
- kMatchCMMType EQU $00000001
- kMatchApplProfileVersion EQU $00000002
- kMatchDataType EQU $00000004
- kMatchDeviceType EQU $00000008
- kMatchDeviceManufacturer EQU $00000010
- kMatchDeviceModel EQU $00000020
- kMatchDeviceAttributes EQU $00000040
- kMatchFlags EQU $00000080
- kMatchOptions EQU $00000100
- kMatchWhite EQU $00000200
- kMatchBlack EQU $00000400
-
-
- ; Profile Header version
- kCMApplProfileVersion EQU $0100
-
- ; Data types
- rgbData EQU 'RGB '
- cmykData EQU 'CMYK'
- grayData EQU 'GRAY'
- xyzData EQU 'XYZ '
-
- ; Device types
- monitorDevice EQU 'mntr'
- scannerDevice EQU 'scnr'
- printerDevice EQU 'prtr'
- qdSystemDevice EQU 'sys '
- qdGDevice EQU 'gdev'
-
- ; Profile flags
- CMNativeMatchingPreferred EQU $00000001 ; Default to native not preferred
- CMTurnOffCache EQU $00000002 ; Default to turn on CMM cache
-
- ; Profile options
- CMPerceptualMatch EQU $00000000 ; Default. For photographic images
- CMColorimetricMatch EQU $00000001 ; Exact matching when possible
- CMSaturationMatch EQU $00000002 ; For solid colors
-
- ; ColorSync result codes
- CMNoError EQU 0
- CMProfileError EQU -170
- CMMethodError EQU -171
- CMMemFullError EQU -172
- CMUnimplementedError EQU -173
- CMParamError EQU -174
- CMMethodNotFound EQU -175 ; CMM not present
- CMProfileNotFound EQU -176 ; Responder error
- CMProfilesIdentical EQU -177 ; Profiles the same
- CMCantConcatenateError EQU -178 ; Profile can't be concatenated
- CMCantXYZ EQU -179 ; CMM cant handle XYZ space
- CMCantDeleteProfile EQU -180 ; Responder error
- CMUnsupportedDataType EQU -181 ; Responder error
- CMNoCurrentProfile EQU -182 ; Responder error
-
- grayResponse EQU 0
- redResponse EQU 1
- greenResponse EQU 2
- blueResponse EQU 3
- cyanResponse EQU 4
- magentaResponse EQU 5
- yellowResponse EQU 6
- ucrResponse EQU 7
- bgResponse EQU 8
- onePlusLastResponse EQU 9
-
- ; Printing Stuff that will be moved later
- enableColorMatchingOp EQU 12
- registerProfileOp EQU 13
-
- ; Types
-
- XYZColor RECORD 0
- X DS.W 1 ; 1.15 bit unsigned fixed numbers
- Y DS.W 1
- Z DS.W 1
- ENDR
-
- CMYKColor RECORD 0
- cyan DS.W 1
- magenta DS.W 1
- yellow DS.W 1
- black DS.W 1
- ENDR
-
- CMColor RECORD 0
- rgb DS RGBColor
- ORG rgb
- xyz DS XYZColor
- ORG rgb
- cmyk DS CMYKColor
- size EQU *
- ENDR
-
- CMHeader RECORD 0
- size DS.L 1 ; This is the total size of the Profile including custom data
- CMMType DS.l 1 ; Corresponding CMM
- applProfileVersion DS.L 1 ; Version of CMProfile format
- dataType DS.L 1 ; rgbData, etc.
- deviceType DS.L 1 ; monitorDevice, etc.
- deviceManufacturer DS.L 1 ; Registered with DTS
- deviceModel DS.L 1 ; Specific to Manufacturer
- deviceAttributes DS.L 2 ; Attributes like paper, ink, etc.
- profileNameOffset DS.L 1 ; Offset to profile name from top of data
- customDataOffset DS.L 1 ; Offset to custom data from top of data
- flags DS.L 1
- options DS.L 1
- white DS XYZColor
- black DS XYZColor
- recordSize EQU *
- ENDR
-
- CMProfileSearchRecord RECORD 0
- header DS CMHeader
- fieldMask DS.L 1
- reserved DS.L 2
- size EQU *
- ENDR
-
- CMProfileChromaticities RECORD 0
- red DS XYZColor
- green DS XYZColor
- blue DS XYZColor
- cyan DS XYZColor
- magenta DS XYZColor
- yellow DS XYZColor
- size EQU *
- ENDR
-
- IString RECORD 0
- theScript DS.W 1
- theString DS.B 64 ; Str63
- size EQU *
- ENDR
-
- CMProfileResponse RECORD 0
- counts DS.W onePlusLastResponse
- data DS.W 1 ; Variable size
- ENDR
-
- CMProfile RECORD 0
- header DS CMHeader
- profile DS CMProfileChromaticities
- response DS CMProfileResponse ; Variable size
- profileName DS IString ; Variable size
- customData DS.W 1 ; Optional variable length custom CMM data. Word aligned.
- ENDR
-
- ; Printing Stuff that will be moved later
- ; PrGeneral parameter blocks
- TEnableColorMatchingBlk RECORD 0
- iOpCode DS.W 1
- iError DS.W 1
- lReserved DS.L 1
- hPrint DS.L 1
- fEnableIt DS.B 1
- ALIGN 2
- size EQU *
- ENDR
-
- TRegisterProfileBlk RECORD 0
- iOpCode DS.W 1
- iError DS.W 1
- lReserved DS.L 1
- hPrint DS.L 1
- fRegisterIt DS.B 1
- ALIGN 2
- size EQU *
- ENDR
-
- ; High Level Calls
- MACRO
- _BeginMatching
- MOVE.L #$000C000A, DO
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _EndMatching
- MOVE.L #$0004000B, DO
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _GetProfile
- MOVE.L #$00100005, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _SetProfile
- MOVE.L #$000C0006, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _SetProfileDescription
- MOVE.L #$00100010, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _GetColorSyncFolderSpec
- MOVE.L #$000C0011, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _GetIndexedProfile
- MOVE.L #$00140012, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _DeleteDeviceProfile
- MOVE.L #$000C0013, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- ; Data interchange routines
- MACRO
- _UseProfile
- MOVE.L #$00040008, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _DrawMatchedPicture
- MOVE.L #$000C0009, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _EnableMatching
- MOVE.L #$0002000D, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- ; Profile concatenation
- MACRO
- _ConcatenateProfiles
- MOVE.L #$000C000C, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- ; Profile manipulation routines
- MACRO
- _GetProfileName
- MOVE.L #$0008000E, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _GetProfileAdditionalDataOffset
- MOVE.L #$0004000F, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- ; Low level color calculation routines
- MACRO
- _CWNewColorWorld
- MOVE.L #$000C0000, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _CWDisposeColorWorld
- MOVE.L #$00040001, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _CWMatchColors
- MOVE.L #$000C0002, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _CWCheckColors
- MOVE.L #$00100003, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _CWMatchPixMap
- MOVE.L #$00100004, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- MACRO
- _CWCheckPixMap
- MOVE.L #$00140007, D0
- DC.W $ABEE ; TB 03EE
- ENDM
-
- ENDIF ; ...already included
-